<ul>
  <% project.experiments.viewable_by_user(current_user, current_team).includes(:my_modules).active.sort_by { |e| @project_contents[:experiments].index(e.id) || @project_contents[:experiments].length if report }.each do |experiment| %>
    <li class="experiment-element">
      <div class="experiment-block">
        <span class="sci-checkbox-container">
          <input type="checkbox" value="<%= experiment.id %>" class="sci-checkbox report-experiment-checkbox"
          <%= 'checked' if !report || @project_contents[:experiments].include?(experiment.id)
          %>/>
          <span class="sci-checkbox-label"></span>
        </span>
        <i class="sn-icon sn-icon-down " data-toggle="collapse" href="#experimentContentContainer<%= experiment.id %>" aria-expanded="false"></i>
        <span class="experiment-name" title="<%= experiment.name %>">
          <%= experiment.name %>
        </span>
        <div class="move-buttons sci-btn-group">
           <button class="btn btn-light icon-btn move-up">
              <i class="sn-icon sn-icon-arrow-up"></i>
           </button>
           <button class="btn btn-light icon-btn move-down">
              <i class="sn-icon sn-icon-arrow-down"></i>
           </button>
        </div>
      </div>
      <ul class="experiment-contents collapse in" id="experimentContentContainer<%= experiment.id %>">
        <% experiment.my_modules.viewable_by_user(current_user, current_team).active.order(id: :asc).each do |my_module| %>
          <li class="experiment-my-module">
            <span class="sci-checkbox-container">
              <input type="checkbox" value="<%= my_module.id %>" class="sci-checkbox report-my-module-checkbox"
              <%= 'checked' if !report || @project_contents[:my_modules].include?(my_module.id)
              %>/>
              <span class="sci-checkbox-label"></span>
            </span>
            <span class="my-module-name" title="<%= my_module.name %>">
              <%= my_module.name %>
            </span>
            <i class="sn-icon sn-icon-drag"></i>
          </li>
        <% end %>
      </ul>
    </li>
  <% end %>
</ul>
